blktap: provide a variant of __RING_SIZE() that is an integer constant expression
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 6 Mar 2010 13:31:03 +0000 (13:31 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 6 Mar 2010 13:31:03 +0000 (13:31 +0000)
Without this new variant, gcc 4.5 won't compile where this is being
used to specify array sizes.  See also c/s 20975.

Signed-off-by: Charles Arnold <carnold@novell.com>
tools/blktap/lib/blktaplib.h
tools/blktap2/include/blktaplib.h

index d54ae3e57b249c5699484c14fe7183144aab8688..47dcdff05b1d4457767a2243e1547895b21425f8 100644 (file)
@@ -42,7 +42,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
 
 /* size of the extra VMA area to map in attached pages. */
 #define BLKTAP_VMA_PAGES BLK_RING_SIZE
index b9282409115e0a58046ee1dfe5ef2b1246b9f3bd..d91a29b25f0929bab15af7bfd6c1fbd609c351d6 100644 (file)
@@ -45,7 +45,7 @@
 #define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a)
 #define PERROR(_f, _a...)  EPRINTF(_f ": %s", ##_a, strerror(errno))
 
-#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
 
 /* size of the extra VMA area to map in attached pages. */
 #define BLKTAP_VMA_PAGES BLK_RING_SIZE